home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_visible == 0)
- {
- amoebaSound.stop();
- soundStartable = true;
- _X = -30;
- xDirection = random(2);
- if(xDirection == 0)
- {
- xSpeed = 4;
- }
- if(xDirection == 1)
- {
- xSpeed = -4;
- }
- }
- if(getTimer() - appearTime > pause)
- {
- _visible = 1;
- }
- if(_visible)
- {
- _root.actions.collisions(this);
- _root.actions.wrapAround(this);
- if(_root.startButton._alpha < 10 && soundStartable)
- {
- amoebaSound.start(0,99999);
- amoebaSound.setVolume(50);
- soundStartable = false;
- }
- if(_root.ship._alpha > 90 && !firing && _X > 100 && _X < 500)
- {
- firing = true;
- duplicateMovieClip(_root.amoebaShot,"newShot5000",21384);
- }
- if(getTimer() - appearTime > 30000 && (_X < 0 || _X > 640))
- {
- _root.actions.death(this);
- }
- _X = _X + xSpeed;
- _Y = _Y + ySpeed;
- _rotation = _rotation + rotateSpeed;
- }
- if(getTimer() - moveTime > random(2000) + 2000)
- {
- yDirection = random(3);
- rotateSpeed = random(8) - 4;
- moveTime = getTimer();
- if(yDirection == 0)
- {
- ySpeed = 4;
- }
- if(yDirection == 1)
- {
- ySpeed = -4;
- }
- if(yDirection == 2)
- {
- ySpeed = 0;
- }
- }
- }
-